package com.ruoyi.relation.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 分销关系信息对象 wdmd_distribution_relation
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
public class DistributionRelation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 关系ID */
    private Long relationId;

    /** 分销员ID */
    @Excel(name = "分销员ID")
    private Long distributorId;

    /** 下级用户ID */
    @Excel(name = "下级用户ID")
    private Long subordinateId;

    /** 关系层级：1-一级 2-二级 */
    @Excel(name = "关系层级：1-一级 2-二级")
    private String relationLevel;

    /** 关系绑定时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "关系绑定时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date bindTime;

    /** 是否有效：0-失效 1-有效 */
    @Excel(name = "是否有效：0-失效 1-有效")
    private String isActive;

    /** 状态（0=上架 1=下架） */
    @Excel(name = "状态", readConverterExp = "0==上架,1==下架")
    private String status;

    /** 删除标志（0存在 2删除） */
    private String delFlag;

    /** 版本号（乐观锁） */
    @Excel(name = "版本号", readConverterExp = "乐=观锁")
    private Long version;

    public void setRelationId(Long relationId) 
    {
        this.relationId = relationId;
    }

    public Long getRelationId() 
    {
        return relationId;
    }

    public void setDistributorId(Long distributorId) 
    {
        this.distributorId = distributorId;
    }

    public Long getDistributorId() 
    {
        return distributorId;
    }

    public void setSubordinateId(Long subordinateId) 
    {
        this.subordinateId = subordinateId;
    }

    public Long getSubordinateId() 
    {
        return subordinateId;
    }

    public void setRelationLevel(String relationLevel) 
    {
        this.relationLevel = relationLevel;
    }

    public String getRelationLevel() 
    {
        return relationLevel;
    }

    public void setBindTime(Date bindTime) 
    {
        this.bindTime = bindTime;
    }

    public Date getBindTime() 
    {
        return bindTime;
    }

    public void setIsActive(String isActive) 
    {
        this.isActive = isActive;
    }

    public String getIsActive() 
    {
        return isActive;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("relationId", getRelationId())
            .append("distributorId", getDistributorId())
            .append("subordinateId", getSubordinateId())
            .append("relationLevel", getRelationLevel())
            .append("bindTime", getBindTime())
            .append("isActive", getIsActive())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
